package com.gopay.common.domain.acps;
import com.gopay.common.domain.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 账务资源隔离日志表
 * Created by xuHui on 2017/07/28.
 */
@Entity
@Table(name="ACPS_RESOURCE_ISO_LOG")
public class AcpsResourceIsoLog extends BaseEntity {
    /** 日志流水号 */
    @Id
    @SequenceGenerator( name = "ACPS_RESOURCE_ISO_LOG_SEQ_GENERATOR", sequenceName = "ACPS_RESOURCE_ISO_LOG_SEQ", allocationSize = 1 )
    @GeneratedValue( strategy = GenerationType.SEQUENCE, generator = "ACPS_RESOURCE_ISO_LOG_SEQ_GENERATOR" )
    @Column(name="ID")
    private Integer id;
    /** tcc uuid（transinfo+reqtoken） */
    @Column(name="REQ_TOKEN")
    private String reqToken;
    /** 订单号_记账点 */
    @Column(name="PACKAGE_ID")
    private String packageId;
    /** 账户id */
    @Column(name="ACCT_ID")
    private String acctId;
    /** 隔离方式(ins-00，upd-01) */
    @Column(name="ISOLATION_TYPE")
    private String isolationType;
    /** 交易金额 */
    @Column(name="TRAN_AMT")
    private BigDecimal tranAmt;
    /** 总余额修改后 */
    @Column(name="BAL_AFTER")
    private BigDecimal balAfter;
    /** 总余额修改前 */
    @Column(name="BAL_BEFORE")
    private BigDecimal balBefore;
    /** 可用余额修改后 */
    @Column(name="AVA_AFTER")
    private BigDecimal avaAfter;
    /** 可用余额修改前 */
    @Column(name="AVA_BEFORE")
    private BigDecimal avaBefore;
    /** 冻结余额修改后 */
    @Column(name="FREZ_AFTER")
    private BigDecimal frezAfter;
    /** 冻结余额修改前 */
    @Column(name="FREZ_BEFORE")
    private BigDecimal frezBefore;
    /** 创建时间 */
    @Column(name="CREATE_TS")
    private Date createTs;
    /** 状态(00隔离，01未隔离) */
    @Column(name="STATE")
    private String state;
    /** 国付宝订单号 */
    @Column(name="GOPAY_ORDER_ID")
    private String gopayOrderId;
    /** 原因 */
    @Column(name="REASON")
    private String reason;
    /** 版本号 */
    @Version
    @Column(name="VERSION")
    private Integer version;
    /** 最后更新时间 */
    @Column(name="LAST_UPD_TS")
    private Date lastUpdTs;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getReqToken() {
        return reqToken;
    }

    public void setReqToken(String reqToken) {
        this.reqToken = reqToken;
    }

    public String getPackageId() {
        return packageId;
    }

    public void setPackageId(String packageId) {
        this.packageId = packageId;
    }

    public String getAcctId() {
        return acctId;
    }

    public void setAcctId(String acctId) {
        this.acctId = acctId;
    }

    public String getIsolationType() {
        return isolationType;
    }

    public void setIsolationType(String isolationType) {
        this.isolationType = isolationType;
    }

    public BigDecimal getTranAmt() {
        return tranAmt;
    }

    public void setTranAmt(BigDecimal tranAmt) {
        this.tranAmt = tranAmt;
    }

    public BigDecimal getBalAfter() {
        return balAfter;
    }

    public void setBalAfter(BigDecimal balAfter) {
        this.balAfter = balAfter;
    }

    public BigDecimal getBalBefore() {
        return balBefore;
    }

    public void setBalBefore(BigDecimal balBefore) {
        this.balBefore = balBefore;
    }

    public BigDecimal getAvaAfter() {
        return avaAfter;
    }

    public void setAvaAfter(BigDecimal avaAfter) {
        this.avaAfter = avaAfter;
    }

    public BigDecimal getAvaBefore() {
        return avaBefore;
    }

    public void setAvaBefore(BigDecimal avaBefore) {
        this.avaBefore = avaBefore;
    }

    public BigDecimal getFrezAfter() {
        return frezAfter;
    }

    public void setFrezAfter(BigDecimal frezAfter) {
        this.frezAfter = frezAfter;
    }

    public BigDecimal getFrezBefore() {
        return frezBefore;
    }

    public void setFrezBefore(BigDecimal frezBefore) {
        this.frezBefore = frezBefore;
    }

    public Date getCreateTs() {
        return createTs;
    }

    public void setCreateTs(Date createTs) {
        this.createTs = createTs;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getGopayOrderId() {
        return gopayOrderId;
    }

    public void setGopayOrderId(String gopayOrderId) {
        this.gopayOrderId = gopayOrderId;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }
}